'use strict';
module.exports = app => {
    const { STRING, INTEGER } = app.Sequelize;
    const model = app.model.define(
        'practice',
        {
            id: {type: INTEGER, primaryKey: true, autoIncrement: true},
            content: STRING(255),
            image: STRING(255),
            name: STRING(255),
            video_url: STRING(255),
        },
        {
            tableName: 'practice',
            timestamps: true, // 启用时间戳(createdAt, updatedAt)
            updatedAt: 'updated_time', // 不想要 updatedAt
            createdAt: 'create_time', // 想要  createdAt 但是希望名称叫做 created_at
        }
    );
    // 关联关系
    model.associate = function() {

    }
    return model
};
